import request from '@/router/axios';

// 修改状态
export const changeEnable = (params) => {
  return request({
    url: '/api/rb-oem/oem/channels/channels_wx_info/changeEnable',
    method: 'get',
    params
  })
}
// 解绑
export const unbind = (rpiNo) => {
  return request({
    url: '/api/rb-oem/oem/channels/channels_wx_info/unbind',
    method: 'get',
    params: {
      rpiNo
    }
  })
}
// 获取微信登录信息
export const loginInfo = (rpiNo) => {
  return request({
    url: '/api/rb-oem/oem/channels/channels_wx_info/loginInfo',
    method: 'get',
    params: {
      rpiNo
    }
  })
}
// 获取微信登录二维码
export const getQrCode = (rpiNo) => {
  return request({
    url: '/api/rb-oem/oem/channels/channels_wx_info/getQrCode',
    method: 'get',
    params: {
      rpiNo
    }
  })
}
// 验证微信登录
export const checkAuth = (params) => {
  return request({
    url: '/api/rb-oem/oem/channels/channels_wx_info/checkAuth',
    method: 'get',
    params
  })
}
// 获取视频列表
export const pageList = (current, size, params) => {
  return request({
    url: '/api/rb-oem/oem/channels/channels_wx_video/pageList',
    method: 'get',
    params: {
      current,
      size,
      ...params
    }
  })
}
// 删除视频
export const delVideo = (exportId) => {
  return request({
    url: '/api/rb-oem/oem/channels/channels_wx_video/del',
    method: 'post',
    params: {
      exportId
    }
  })
}
// 更新视频
export const updateVideo = (rpiNo) => {
  return request({
    url: '/api/rb-oem/oem/channels/channels_wx_video/update',
    method: 'get',
    params: {
      rpiNo
    }
  })
}

// 设置视频活动
export const setActive = (params) => {
  return request({
    url: '/api/rb-oem/oem/channels/channels_wx_video/setActive',
    method: 'post',
    params
  })
}

// 获取视频活动
export const activeList = (current, size, params) => {
  return request({
    url: '/api/rb-oem/oem/channels/channels_wx_video/activeList',
    method: 'get',
    params: {
      current,
      size,
      ...params
    }
  })
}
// 设置视频是否跳转
export const setIsTarget = (params) => {
  return request({
    url: '/api/rb-oem/oem/channels/channels_wx_video/setIsTarget',
    method: 'post',
    params
  })
}
